package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * PrizeWin entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_PRIZE_WIN", schema = "MXZ")
public class PrizeWin extends Entity implements java.io.Serializable {

	// Fields

	private Long winId;
	private Member member;
	private String convertCode;
	private Integer type;
	private String name;
	private Float worth;
	private String summary;
	private Integer status;
	private Long useTime;
	private Long expiredTime;
	private Long addTime;

	// Constructors

	/** default constructor */
	public PrizeWin() {
	}

	/** minimal constructor */
	public PrizeWin(Member member, Integer type, String name, Float worth,
			Integer status, Long useTime, Long expiredTime, Long addTime) {
		this.member = member;
		this.type = type;
		this.name = name;
		this.worth = worth;
		this.status = status;
		this.useTime = useTime;
		this.expiredTime = expiredTime;
		this.addTime = addTime;
	}

	/** full constructor */
	public PrizeWin(Member member, String convertCode, Integer type,
			String name, Float worth, String summary, Integer status,
			Long useTime, Long expiredTime, Long addTime) {
		this.member = member;
		this.convertCode = convertCode;
		this.type = type;
		this.name = name;
		this.worth = worth;
		this.summary = summary;
		this.status = status;
		this.useTime = useTime;
		this.expiredTime = expiredTime;
		this.addTime = addTime;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_PRIZE_WIN")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "WIN_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getWinId() {
		return this.winId;
	}

	public void setWinId(Long winId) {
		this.winId = winId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEMBER_ID", nullable = false)
	public Member getMember() {
		return this.member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	@Column(name = "CONVERT_CODE", length = 20)
	public String getConvertCode() {
		return this.convertCode;
	}

	public void setConvertCode(String convertCode) {
		this.convertCode = convertCode;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "NAME", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "WORTH", nullable = false, precision = 8)
	public Float getWorth() {
		return this.worth;
	}

	public void setWorth(Float worth) {
		this.worth = worth;
	}

	@Column(name = "SUMMARY", length = 300)
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "STATUS", nullable = false, precision = 2, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "USE_TIME", nullable = false, precision = 15, scale = 0)
	public Long getUseTime() {
		return this.useTime;
	}

	public void setUseTime(Long useTime) {
		this.useTime = useTime;
	}

	@Column(name = "EXPIRED_TIME", nullable = false, precision = 15, scale = 0)
	public Long getExpiredTime() {
		return this.expiredTime;
	}

	public void setExpiredTime(Long expiredTime) {
		this.expiredTime = expiredTime;
	}

	@Column(name = "ADD_TIME", nullable = false, precision = 15, scale = 0)
	public Long getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Long addTime) {
		this.addTime = addTime;
	}

}